<template>
  <van-nav-bar title="查看二维码" left-arrow @click-left="onClickLeft" />
  <div style="margin: 50px auto; width: 200px">
    <van-image
      width="200"
      height="200"
      :src="image"
      lazy-load
      @click="kanImage"
    />
  </div>
</template>

<script setup>
import { useRoute } from "vue-router";
import { ref, onMounted } from "vue";
import { showImagePreview } from "vant";
const route = useRoute();
onMounted(() => {
  getdata();
});
const image = ref("");
const getdata = () => {
  image.value = route.params.qmCode;
};
const kanImage = () => {
  showImagePreview({
    images: [image.value],
    doubleScale: false,
  });
};
const onClickLeft = () => history.back();
</script>

<style></style>
